PEGetJobStatus4
The PEGetJobStatus4 function was specially designed to accept VB's native 4-byte aligned "Types." It evaluates the status of a print job. You can use this function in a number of programming situations, for example:
- to trigger error messages when a print job fails due to insufficient memory, insufficient disk space, etc.,
- to trigger screen displays (hourglass, series of graphics, etc.) that confirm to the user that work is in progress, or
- to find out whether a job was canceled by the user after PEStartPrintJob returns.
Declare Function PEGetJobStatus4 Lib "crwrap32.dll" (ByVal printJob As
Integer, JobInfo As PEJobInfo4) As Integer
Parameters
printJob
| Specifies the handle of the print job for which you want to determine printing status.
|
JobInfo
| Specifies a pointer to the PEJobInfo4 structure that will capture the information this function retrieves.
|
Returns
- 0 if PEOpenEngine or PEOpenPrintJob has not been called successfully.
- 1 if the job has not started yet (PE_JOBNOTSTARTED).
- 2 if the job is in progress (PE_JOBINPROGRESS).
- 3 if the job has completed successfully (PE_JOBCOMPLETED).
- 4 if the job has failed (PE_JOBFAILED).
- 5 if the job has been canceled by the user (PE_JOBCANCELLED).
- 6 if the report has exceeded the record or time governors (PE_JOBHALTED).